package com.xqboss.apps.vo.sys;

import com.xqboss.apps.domain.user.SysUserWallet;
import com.xqboss.apps.domain.user.UserAssetLidou;
import com.xqboss.apps.enums.consumer.ConsumerTeamMemberTypeEnum;
import com.xqboss.apps.domain.user.UserAssetWrench;
import com.xqboss.apps.enums.consumer.ConsumerTeamRoleEnum;
import com.xqboss.common.annotation.DataMask;
import com.xqboss.common.enums.DataMaskEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author Administrator
 */
@Data
public class SysUserVo {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("用户账号")
    @DataMask(function = DataMaskEnum.PHONE)
    private String userName;

    @ApiModelProperty("用户昵称")
    private String nickName;

    @ApiModelProperty("用户类型（00系统用户 01app用户）")
    private String userType;

    @ApiModelProperty("用户邮箱")
    private String email;

    @ApiModelProperty("手机号码")
    @DataMask(function = DataMaskEnum.PHONE)
    private String phonenumber;

    @ApiModelProperty("区块链地址")
    private String chainAddress;

    @ApiModelProperty("用户性别（0男 1女 2未知）")
    private String sex;

    @ApiModelProperty("队伍角色（1_管理员 2_普通成员）")
    private ConsumerTeamRoleEnum role;

    /**
     * 成员类型（1_主成员 2_爸爸 3_妈妈 4_配偶）；配偶 ——通过判断主成员的性别，来判断配偶展示名称，【男-妻子】【女-丈夫】
     */
    @ApiModelProperty(" 成员类型（1_主成员 2_爸爸 3_妈妈 4_配偶）")
    private ConsumerTeamMemberTypeEnum type;

    @ApiModelProperty("帐号状态（0正常 1停用）")
    private String status;

    @ApiModelProperty("删除标志（0代表存在 2代表删除）")
    private String delFlag;

    @ApiModelProperty("头像地址")
    private String avatar;

    @ApiModelProperty("是否设置密码 0否，1是")
    private Boolean isPassword;

    @ApiModelProperty("是否设置支付密码 0否，1是")
    private Boolean isPayPwd;

    @ApiModelProperty("个人邀请码")
    private String invitationCode;

    @ApiModelProperty("生日（yyyy-mm-dd）")
    private String birthday;

    @ApiModelProperty("身高（cm）")
    private Double height;

    @ApiModelProperty("体重（kg）")
    private Double weight;

    @ApiModelProperty("兴趣爱好")
    private String hobbies;

    @ApiModelProperty("是否隐藏")
    private Boolean hidden;

    @ApiModelProperty("实名姓名")
    private String idCardName;

    @ApiModelProperty("是否实名 0否 ，1是")
    private String isReal;

    @ApiModelProperty("队伍打卡次数")
    private Integer totalPunch;

    @ApiModelProperty("当日队伍打卡收益")
    private BigDecimal punchIntegral;

    @ApiModelProperty("增益值")
    private BigDecimal gainValue;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("用户钱包")
    private List<SysUserWallet> userWallet;

    @ApiModelProperty("用户扳手钱包")
    private UserAssetWrench userAssetWrench;

    @ApiModelProperty("用户力豆钱包")
    private UserAssetLidou userAssetLidou;

    @ApiModelProperty("用户身份 例:竞技者")
    private String identityName;

    @ApiModelProperty("用户身份等级 例:LV.1")
    private String name;

    @ApiModelProperty("身份段位id")
    private Long identityRankId;

    @ApiModelProperty("好友邀请数")
    private long inviteNum;

    @ApiModelProperty("累计扳手数")
    private BigDecimal totalWrench;

    @ApiModelProperty("用户是否具备热豆转增的条件（true-具备）")
    private Boolean isHotBeansGivePer;

    @ApiModelProperty("用户是否具备扳手转增的条件（true-具备）")
    private Boolean isWrenchOpen;

    @ApiModelProperty("用户是否具备力豆转增的条件（true-具备）")
    private Boolean isLidouOpen;

    @ApiModelProperty("是否开通易宝钱包")
    private Boolean isCreateYeeWallet;

    @ApiModelProperty("用户是否具备开启快速抄货的条件（true-具备）")
    private Boolean isQuickCopyList;

    @ApiModelProperty("用户是否具备开启扳手生产工厂的条件(true-具备)")
    private Boolean isOpenWrenchProduction;


    @ApiModelProperty("用户是否已加入公会（true-是）")
    private Boolean isJoinGuild;

    public void setUserAssetWrench(UserAssetWrench userAssetWrench) {
        this.userAssetWrench = userAssetWrench;
        this.totalWrench = userAssetWrench == null? BigDecimal.ZERO:userAssetWrench.getTotal();
    }
}
